package com.jctrip.hotel.source.service.hmein;

import java.math.BigDecimal;
import java.util.List;
import java.util.function.Function;

import com.jctrip.hotel.source.model.OrderDataResult;
import com.jctrip.hotel.source.model.PriceCheckParam;
import com.jctrip.hotel.source.model.hmein.req.CheckAvailableReq;
import com.jctrip.hotel.source.model.hmein.req.CreateOrderReq;
import com.jctrip.hotel.source.model.hmein.req.QueryOrderStatusReq;
import com.jctrip.hotel.source.model.hmein.req.QuerynightAuditInfoReq;
import com.jctrip.hotel.source.model.hmein.resp.*;
import com.jctrip.hotel.source.model.hmein.resp.CityListResult.CityList;
import com.jctrip.hotel.source.model.hmein.resp.HotelFacilitiesResult.HotelFacilitiesList;
import com.jctrip.hotel.source.model.hmein.resp.HotelInfosResult.HotelInfos;
import com.jctrip.hotel.source.model.hmein.resp.HotelRmMcResult.HotelRmMc;
import com.jctrip.hotel.source.model.wehotel.req.OrderData;

/**
 * @Author henry
 * @Date 2023/6/3 17:23
 * @Description
 */
public interface HmeinService {
    String parseHotelId(String innId);

    String parseInnId(String hotelId);

    List<CityList> getCityData(String appId);

    List<String> getHotelIds(String appId);

    HotelInfos getHotelInfo(String appId, String hotelId);

    List<GetHmeinBrandListResult.BrandList> getBrand(String appId);

    List<HotelRmMc> getRoomType(String appId, String hotelId);

    List<String> getHotelPic(String appId, String hotelId);

    List<HotelFacilitiesList> getHotelFacilitiesListData(String appId, String hotelId);

    RoomStatusResult getRoomStatus(String appId, String memberNo, String hotelId, String roomTypeId,
            String start, String end);


    CheckAvailableResult checkAvailability(CheckAvailableReq req);


    CreateOrderResult createOrder(CreateOrderReq req) ;

    OrderDataResult postOrder(CreateOrderReq req, PriceCheckParam priceCheck, String sourceAppId);

    QueryOrderStatusResult queryOrderStatus(String appId, QueryOrderStatusReq req) ;
    QueryOrderStatusResult queryDirectOrderStatus(String appId, QueryOrderStatusReq req) ;

    /**
     *
     * @param appId
     * @param orderNo 如家订单编号
     * @param outOrderNo  jc订单编号
     * @return
     * @throws Exception
     */
    OrderData queryOrderData(String appId,  String orderNo,String outOrderNo) ;


    Boolean cancelOrder(String appId, String orderNo) ;

    /**
     *  得到如家门市价列表
     */
    List<RoomStatusResult.RoomRateDetailDailys> getRetailPriceList(String appId, String hotelId,String roomType, String memberNo, String start, String end);

    /**
     *
     * @param time  2023-10-27T00:00:00Z || 2023-10-27T00:00:00 时间格式
     * @return yyyy-MM-dd 时间格式
     */
    String getTime(String time);
}
